body {
  padding: 0;
  margin: 0;
}

.container {
  min-width: 500px;
  max-width: 800px;
  min-height: 500px;
  margin: 0 auto;
}

.container>nav a {
  text-decoration: none;
  line-height: 30px;
  padding: 10px;
}

a:link,
a:visited,
a:active {
  color: #fff;
}

a:hover {
  font-size: 13pt;
}

.container>nav {
  background: linear-gradient(black, #eee);
}

li {
  list-style: none;
}

ul {
  padding-left: 10px;
}

.display {
  display: block;
}

@media(max-width: 499px) {
  span {
    display: inline;
    color: red;
  }
  nav>ul {
    display: none;
  }
  ul {
    background: linear-gradient(to bottom, red, black);
  }
  nav>ul>li>ul {
    display: none;
  }
  nav>ul>li>ul>li>ul {
    display: none;
  }
}

@media (min-width: 500px) {
  span,
  ul {
    display: none;
  }
  nav>ul {
    position: relative;
    display: block;
  }
  nav>ul>li {
    display: inline-block;
  }
  nav>ul>li>ul {
    width: 150px;
  }
  ul>li:hover>ul {
    display: block;
    background: red;
    position: absolute;
    top: 100%;
    left: 20%;
  }
  ul>li>ul>li:hover>ul {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
  }
}